Optimal. Leaf size=125 \[ \frac {1}{128} \left (128 a^2+96 a b+35 b^2\right ) x-\frac {b (160 a+93 b) \cosh (c+d x) \sinh (c+d x)}{128 d}+\frac {b (96 a+163 b) \cosh ^3(c+d x) \sinh (c+d x)}{192 d}-\frac {25 b^2 \cosh ^5(c+d x) \sinh (c+d x)}{48 d}+\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3288, 1171,
1828, 393, 212} \begin {gather*} \frac {1}{128} x \left (128 a^2+96 a b+35 b^2\right )+\frac {b (96 a+163 b) \sinh (c+d x) \cosh ^3(c+d x)}{192 d}-\frac {b (160 a+93 b) \sinh (c+d x) \cosh (c+d x)}{128 d}+\frac {b^2 \sinh (c+d x) \cosh ^7(c+d x)}{8 d}-\frac {25 b^2 \sinh (c+d x) \cosh ^5(c+d x)}{48 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 393
Rule 1171
Rule 1828
Rule 3288
Rubi steps
\begin {align*} \int \left (a+b \sinh ^4(c+d x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a-2 a x^2+(a+b) x^4\right )^2}{\left (1-x^2\right )^5} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d}-\frac {\text {Subst}\left (\int \frac {-8 a^2+b^2+8 \left (3 a^2+b^2\right ) x^2-8 (3 a-b) (a+b) x^4+8 (a+b)^2 x^6}{\left (1-x^2\right )^4} \, dx,x,\tanh (c+d x)\right )}{8 d}\\ &=-\frac {25 b^2 \cosh ^5(c+d x) \sinh (c+d x)}{48 d}+\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d}+\frac {\text {Subst}\left (\int \frac {48 a^2+19 b^2-96 \left (a^2-b^2\right ) x^2+48 (a+b)^2 x^4}{\left (1-x^2\right )^3} \, dx,x,\tanh (c+d x)\right )}{48 d}\\ &=\frac {b (96 a+163 b) \cosh ^3(c+d x) \sinh (c+d x)}{192 d}-\frac {25 b^2 \cosh ^5(c+d x) \sinh (c+d x)}{48 d}+\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d}-\frac {\text {Subst}\left (\int \frac {-3 \left (64 a^2-32 a b-29 b^2\right )+192 (a+b)^2 x^2}{\left (1-x^2\right )^2} \, dx,x,\tanh (c+d x)\right )}{192 d}\\ &=-\frac {b (160 a+93 b) \cosh (c+d x) \sinh (c+d x)}{128 d}+\frac {b (96 a+163 b) \cosh ^3(c+d x) \sinh (c+d x)}{192 d}-\frac {25 b^2 \cosh ^5(c+d x) \sinh (c+d x)}{48 d}+\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d}+\frac {\left (128 a^2+96 a b+35 b^2\right ) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{128 d}\\ &=\frac {1}{128} \left (128 a^2+96 a b+35 b^2\right ) x-\frac {b (160 a+93 b) \cosh (c+d x) \sinh (c+d x)}{128 d}+\frac {b (96 a+163 b) \cosh ^3(c+d x) \sinh (c+d x)}{192 d}-\frac {25 b^2 \cosh ^5(c+d x) \sinh (c+d x)}{48 d}+\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 92, normalized size = 0.74 \begin {gather*} \frac {24 \left (128 a^2+96 a b+35 b^2\right ) (c+d x)-96 b (16 a+7 b) \sinh (2 (c+d x))+24 b (8 a+7 b) \sinh (4 (c+d x))-32 b^2 \sinh (6 (c+d x))+3 b^2 \sinh (8 (c+d x))}{3072 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.12, size = 100, normalized size = 0.80
method | result | size |
default | \(a^{2} x +\frac {\left (-\frac {7}{16} b^{2}-a b \right ) \sinh \left (2 d x +2 c \right )}{2 d}+\frac {\left (\frac {7}{32} b^{2}+\frac {1}{4} a b \right ) \sinh \left (4 d x +4 c \right )}{4 d}+\frac {35 b^{2} x}{128}+\frac {3 a b x}{4}-\frac {b^{2} \sinh \left (6 d x +6 c \right )}{96 d}+\frac {b^{2} \sinh \left (8 d x +8 c \right )}{1024 d}\) | \(100\) |
risch | \(\frac {35 b^{2} x}{128}+a^{2} x +\frac {3 a b x}{4}+\frac {b^{2} {\mathrm e}^{8 d x +8 c}}{2048 d}-\frac {b^{2} {\mathrm e}^{6 d x +6 c}}{192 d}+\frac {7 \,{\mathrm e}^{4 d x +4 c} b^{2}}{256 d}+\frac {{\mathrm e}^{4 d x +4 c} a b}{32 d}-\frac {7 \,{\mathrm e}^{2 d x +2 c} b^{2}}{64 d}-\frac {{\mathrm e}^{2 d x +2 c} a b}{4 d}+\frac {7 \,{\mathrm e}^{-2 d x -2 c} b^{2}}{64 d}+\frac {{\mathrm e}^{-2 d x -2 c} a b}{4 d}-\frac {7 \,{\mathrm e}^{-4 d x -4 c} b^{2}}{256 d}-\frac {{\mathrm e}^{-4 d x -4 c} a b}{32 d}+\frac {b^{2} {\mathrm e}^{-6 d x -6 c}}{192 d}-\frac {b^{2} {\mathrm e}^{-8 d x -8 c}}{2048 d}\) | \(218\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 183, normalized size = 1.46 \begin {gather*} \frac {1}{32} \, a b {\left (24 \, x + \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} - \frac {8 \, e^{\left (2 \, d x + 2 \, c\right )}}{d} + \frac {8 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d} - \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} + a^{2} x - \frac {1}{6144} \, b^{2} {\left (\frac {{\left (32 \, e^{\left (-2 \, d x - 2 \, c\right )} - 168 \, e^{\left (-4 \, d x - 4 \, c\right )} + 672 \, e^{\left (-6 \, d x - 6 \, c\right )} - 3\right )} e^{\left (8 \, d x + 8 \, c\right )}}{d} - \frac {1680 \, {\left (d x + c\right )}}{d} - \frac {672 \, e^{\left (-2 \, d x - 2 \, c\right )} - 168 \, e^{\left (-4 \, d x - 4 \, c\right )} + 32 \, e^{\left (-6 \, d x - 6 \, c\right )} - 3 \, e^{\left (-8 \, d x - 8 \, c\right )}}{d}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 205, normalized size = 1.64 \begin {gather*} \frac {3 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{7} + 3 \, {\left (7 \, b^{2} \cosh \left (d x + c\right )^{3} - 8 \, b^{2} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{5} + {\left (21 \, b^{2} \cosh \left (d x + c\right )^{5} - 80 \, b^{2} \cosh \left (d x + c\right )^{3} + 12 \, {\left (8 \, a b + 7 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} + 3 \, {\left (128 \, a^{2} + 96 \, a b + 35 \, b^{2}\right )} d x + 3 \, {\left (b^{2} \cosh \left (d x + c\right )^{7} - 8 \, b^{2} \cosh \left (d x + c\right )^{5} + 4 \, {\left (8 \, a b + 7 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} - 8 \, {\left (16 \, a b + 7 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{384 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 332 vs.
\(2 (116) = 232\).
time = 1.04, size = 332, normalized size = 2.66 \begin {gather*} \begin {cases} a^{2} x + \frac {3 a b x \sinh ^{4}{\left (c + d x \right )}}{4} - \frac {3 a b x \sinh ^{2}{\left (c + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{2} + \frac {3 a b x \cosh ^{4}{\left (c + d x \right )}}{4} + \frac {5 a b \sinh ^{3}{\left (c + d x \right )} \cosh {\left (c + d x \right )}}{4 d} - \frac {3 a b \sinh {\left (c + d x \right )} \cosh ^{3}{\left (c + d x \right )}}{4 d} + \frac {35 b^{2} x \sinh ^{8}{\left (c + d x \right )}}{128} - \frac {35 b^{2} x \sinh ^{6}{\left (c + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{32} + \frac {105 b^{2} x \sinh ^{4}{\left (c + d x \right )} \cosh ^{4}{\left (c + d x \right )}}{64} - \frac {35 b^{2} x \sinh ^{2}{\left (c + d x \right )} \cosh ^{6}{\left (c + d x \right )}}{32} + \frac {35 b^{2} x \cosh ^{8}{\left (c + d x \right )}}{128} + \frac {93 b^{2} \sinh ^{7}{\left (c + d x \right )} \cosh {\left (c + d x \right )}}{128 d} - \frac {511 b^{2} \sinh ^{5}{\left (c + d x \right )} \cosh ^{3}{\left (c + d x \right )}}{384 d} + \frac {385 b^{2} \sinh ^{3}{\left (c + d x \right )} \cosh ^{5}{\left (c + d x \right )}}{384 d} - \frac {35 b^{2} \sinh {\left (c + d x \right )} \cosh ^{7}{\left (c + d x \right )}}{128 d} & \text {for}\: d \neq 0 \\x \left (a + b \sinh ^{4}{\left (c \right )}\right )^{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 183, normalized size = 1.46 \begin {gather*} \frac {1}{128} \, {\left (128 \, a^{2} + 96 \, a b + 35 \, b^{2}\right )} x + \frac {b^{2} e^{\left (8 \, d x + 8 \, c\right )}}{2048 \, d} - \frac {b^{2} e^{\left (6 \, d x + 6 \, c\right )}}{192 \, d} + \frac {b^{2} e^{\left (-6 \, d x - 6 \, c\right )}}{192 \, d} - \frac {b^{2} e^{\left (-8 \, d x - 8 \, c\right )}}{2048 \, d} + \frac {{\left (8 \, a b + 7 \, b^{2}\right )} e^{\left (4 \, d x + 4 \, c\right )}}{256 \, d} - \frac {{\left (16 \, a b + 7 \, b^{2}\right )} e^{\left (2 \, d x + 2 \, c\right )}}{64 \, d} + \frac {{\left (16 \, a b + 7 \, b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{64 \, d} - \frac {{\left (8 \, a b + 7 \, b^{2}\right )} e^{\left (-4 \, d x - 4 \, c\right )}}{256 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.29, size = 108, normalized size = 0.86 \begin {gather*} \frac {21\,b^2\,\mathrm {sinh}\left (4\,c+4\,d\,x\right )-84\,b^2\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )-4\,b^2\,\mathrm {sinh}\left (6\,c+6\,d\,x\right )+\frac {3\,b^2\,\mathrm {sinh}\left (8\,c+8\,d\,x\right )}{8}-192\,a\,b\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )+24\,a\,b\,\mathrm {sinh}\left (4\,c+4\,d\,x\right )+384\,a^2\,d\,x+105\,b^2\,d\,x+288\,a\,b\,d\,x}{384\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________